<?php
namespace YunCangChu\Controller;
use Think\Controller;
class MyController extends PublicController {
    //我的
    public function indexSet(){
        //获取个人信息
        $url = C('api_url')['个人信息'];
        $data['FuncName'] = 'GET_INFO_PERSON';
        $data['LoginID'] = $this->LoginID;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        if($return_arr['ReturnCode'] == 0)
        {
            $this->assign('data',$return_arr['ReturnData']);
            $this->display();
        }
        else
        {
            echo $return_arr['ReturnText'];
        }
    }
    //个人信息
    public function PersonalInformation()
    {
      /*  array(3) {
        ["ReturnCode"] => int(0)
        ["ReturnText"] => string(0) ""
        ["ReturnData"] => array(7) {
            ["uName"] => string(0) ""
            ["uNickName"] => string(3) "空"
            ["uProfilePic"] => string(82) "http://www.ees.com.cn/WMS/Photos/Profiles/f8d66011-7bd8-4c33-a022-2a4edfbc8611.jpg"
            ["uMobile"] => string(11) "15210088045"
            ["uWeChat"] => string(0) ""
            ["uQQ"] => string(0) ""
            ["uWorkID"] => string(0) ""
  }
}*/
        //获取个人信息
        $url = C('api_url')['个人信息'];
        $data['FuncName'] = 'GET_INFO_PERSON';
        $data['LoginID'] = $this->LoginID;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        if($return_arr['ReturnCode'] == 0)
        {
            $this->assign('data',$return_arr['ReturnData']);
            $this->display();
        }
        else
        {
            echo $return_arr['ReturnText'];
        }
    }
    //个人信息修改头像
    public function ajaxImg()
    {
        $return = json_decode($this->upload(),true);
        if($return['code'] != 200)
        {
            $this->ajaxReturn(array('code'=>404,'msg'=>$return['msg']));
        }
        else
        {
            //图片url
            $file =  dirname(dirname(dirname(dirname(__FILE__)))).'/Uploads/'.$return['src'];
            $url = 'http://www.ees.com.cn/WMS/AppInterface/UploadPic.ashx';
            //$url = 'http://yuncangchu.com/index.php?g=YunCangChu&m=my&a=text';
            $post_data = array(
            "LoginID" => $this->LoginID,
             //要上传的本地文件地址
             "Photo" => "@".$file,
             'Type'=>'H'
             );
             $ch = curl_init();
             curl_setopt($ch , CURLOPT_URL , $url);
             curl_setopt($ch , CURLOPT_RETURNTRANSFER, 1);
             curl_setopt($ch , CURLOPT_POST, 1);
             curl_setopt($ch , CURLOPT_POSTFIELDS, $post_data);
             $output = curl_exec($ch);
             $output = json_decode($output,true);
             if($output['ReturnCode'] == 0)
             {
                 //上传头像成功 调用修改头像接口
                 $url = C('api_url')['修改头像接口'];
                 $data = array();
                 $data['FuncName'] = 'MODIFY_PROFILE';
                 $data['LoginID'] = $this->LoginID;
                 //头像路径
                 $data['Profile'] = $output['ReturnData'];
                 $app_data = baseMD5($data);
                 $return_arr = (cUrl($url,$header=null, $app_data));
                 $return_arr = json_decode($return_arr,true);
                 if($return_arr['ReturnCode'] == 0)
                 {
                     $this->ajaxReturn(array('code'=>200));
                 }
                 else
                 {
                     $this->ajaxReturn(array('code'=>404,'msg'=>$return_arr['ReturnText']));
                 }
             }
             else
             {
                 $this->ajaxReturn(array('code'=>404,'msg'=>$output['ReturnText']));
             }
        }

    }
    //个人信息修改昵称
    public function name()
    {
        $name = I('name');
        $url = C('api_url')['修改昵称接口'];
        $data['FuncName'] = 'SET_NICKNAME';
        $data['LoginID'] = $this->LoginID;
        $data['NickName'] = $name;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        if($return_arr['ReturnCode'] == 0)
        {
            $this->ajaxReturn(array('code'=>200));
        }
        else
        {
            //修改失败返回错误信息
            $this->ajaxReturn(array('code'=>404,'msg'=>$return_arr['ReturnText']));
        }
    }
    //个人信息我的钱包展示
    public function myMoney()
    {
   /*     array(3) {
        ["ReturnCode"] => int(0)
        ["ReturnText"] => string(0) ""
        ["ReturnData"] => array(3) {
            ["MyAmount"] => float(0)
            ["Total"] => int(0)
            ["Rows"] => array(0) {
            }
  }
}*/
        $url = C('api_url')['获取我的钱包我的余额明细'];
        $data['FuncName'] = 'GET_AMOUNT_DETAIL';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        $this->assign('data',$return_arr['ReturnData']);

        $url = C('api_url')['获取我的积分明细'];
        $data['FuncName'] = 'GET_POINT_DETAIL';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        $this->assign('jifen',$return_arr['ReturnData']['MyPoint']);

        $url = C('api_url')['获取我的优惠券'];
        $data['FuncName'] = 'GET_COUPON_DETAIL';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        //print_r($return_arr['ReturnData']);die;
        $this->assign('juan',$return_arr['ReturnData']['total']);
        $this->display();
    }
    //个人余额展示
    public function myYue()
    {
        $url = C('api_url')['获取我的钱包我的余额明细'];
        $data['FuncName'] = 'GET_AMOUNT_DETAIL';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        //print_r($return_arr['ReturnData']);die;
        $this->assign('data',$return_arr['ReturnData']);
        $this->display();
    }
    //个人余额展示加载更多
    public function myYueMore()
    {
        $url = C('api_url')['获取我的钱包我的余额明细'];
        $data['FuncName'] = 'GET_AMOUNT_DETAIL';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        $this->assign('data',$return_arr['ReturnData']);
        $this->display();
    }
    //个人设置
    public function shezhi()
    {
        $this->display();
    }
    //关于我们
    public function about()
    {
        $url = 'http://www.ees.com.cn/WMS/AppInterface/About.aspx';
        $html = file_get_contents($url);
        $this->assign('html',$html);
        $this->display();
    }
    //账户安全
    public function ZhangHuAnQuan()
    {
       $this->display();
    }
    //修改密码 页面展示
    public function updatePassword()
    {
        $this->display();
    }
    //修改密码接口
    public function updatePassword1()
    {
        $data_post = I('post.');
        $url = C('api_url')['修改密码'];
        $data['FuncName'] = 'USER_UPDATE_PASSWORD';
        $data['LoginID'] = $this->LoginID;
        $data['Passwd'] = $data_post['Passwd'];
        $data['PasswdNew'] = $data_post['PasswdNew'];
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        if($return_arr['ReturnCode'] == 0)
        {
            $this->ajaxReturn(array('code'=>'0','msg'=>'修改密码成功'));
        }
        else
        {
            $this->ajaxReturn(array('code'=>'-1','msg'=>$return_arr['ReturnText']));
        }
    }
    //设置交易密码
    public function setpassword()
    {
        $this->display();
    }
    //确认交易密码
    public function queren()
    {
        $password = I('get.password');
        if($password == '')
        {
            return false;
        }
        $this->display();
    }
    //设置交易密码
    public function sheZhiJiaoYiMiMa()
    {
        $word = I('post.word');
        $url = C('api_url')['设置交易密码'];
        $data['FuncName'] = 'SET_TRADE_PASSWD';
        $data['LoginID'] = $this->LoginID;
        $data['Passwd'] = $word;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        if($return_arr['ReturnCode'] == 0)
        {
            $this->ajaxReturn(array('msg'=>'设置成功'));
        }
        else
        {
            $this->ajaxReturn(array('msg'=>'设置失败'));
        }
    }
    //修改手机号
    public function uphone()
    {
        //手机号
        $this->assign('login',$this->LoginID);
        $this->display();

    }
    //发送验证码1
    public  function yanzenma1()
    {
        S(array('type'=>'file','expire'=>60));
        $url = C('api_url')['手机发送验证码'];
        $data['FuncName'] = 'GET_VERIFICATION_CODE';
        $data['PhoneNo'] = $this->LoginID;
        //$data['PhoneNo'] = '18519775375';
        $data['Purpose'] = 'M';
        $app_data = baseMD5($data);
        if(S('yzm1-'.$data['PhoneNo']))
        {
            //操作频繁,请稍后再试
            echo '0';
        }
        else
        {
            S('yzm1-'.$data['PhoneNo'],$data['PhoneNo']);
            $return_arr = cUrl($url,$header=null, $app_data);
            if($return_arr['ReturnCode'] == 0)
            {

                echo '1';
            }
            else
            {
                echo '-1';
            }
        }

    }
    //发送验证码2
    public  function yanzenma2()
    {
        //获取手机号
        $phone = I('post.phone');
        if($phone == '')
        {
            return false;
        }
        S(array('type'=>'file','expire'=>60));
        $url = C('api_url')['手机发送验证码'];
        $data['FuncName'] = 'GET_VERIFICATION_CODE';
        //$data['PhoneNo'] = $this->LoginID;
        $data['PhoneNo'] = $phone;
        $data['Purpose'] = 'M';
        $app_data = baseMD5($data);
        if(S('yzm1-'.$data['PhoneNo']))
        {
            //操作频繁,请稍后再试
            echo '0';
        }
        else
        {
            S('yzm1-'.$data['PhoneNo'],$data['PhoneNo']);
            $return_arr = cUrl($url,$header=null, $app_data);
            if($return_arr['ReturnCode'] == 0)
            {

                echo '1';
            }
            else
            {
                echo '-1';
            }
        }

    }
    //修改手机
    public function updatePhone()
    {
        $yzm1 = I('post.yzm1');
        $phone = I('post.phone');
        $yzm2 = I('post.yzm2');
        $url =C('api_url')['修改手机号'];
        $data['FuncName'] = 'USER_REBIND_MOBILE';
        $data['LoginID'] = $this->LoginID;
        $data['VCode'] = $yzm1;
        $data['MobileNew'] = $phone;
        $data['VCodeNew'] = $yzm2;
        $app_data = baseMD5($data);
        $return_arr = cUrl($url,$header=null, $app_data);
        if($return_arr['ReturnCode'] == 0)
        {
            $this->ajaxReturn(array('code'=>'0'));
        }
        else
        {
            $this->ajaxReturn(array('code'=>'-1','msg'=>$return_arr['ReturnText']));
        }
    }
    public function collection(){
        $url =C('api_url')['收藏列表'];
        $data['FuncName'] = 'GET_WH_FAV_LIST';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = cUrl($url,$header=null, $app_data);
         //print_r($return_arr);die;
        if($return_arr["ReturnCode"]==0){
            $arr=$return_arr["ReturnData"]["rows"];
            $this->assign("arr",$arr);
            $this->display();
        }else{
            echo $return_arr['ReturnText'];
        }
        //  print_r($return_arr);
    }
    //更多收藏
    public function collection_list()
    {
        $page = I('post.page');
        $url =C('api_url')['收藏列表'];
        $data['FuncName'] = 'GET_WH_FAV_LIST';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = $page;
        $app_data = baseMD5($data);
        $return_arr = cUrl($url,$header=null, $app_data);


        $arr=$return_arr["ReturnData"]["rows"];
        if(count($arr) >0)
        {
            $this->assign("arr",$arr);
            $html = $this->fetch('public:collection_public');
            $this->ajaxReturn(array('code'=>200,'html'=>$html));
        }
        else
        {
            $this->ajaxReturn(array('code'=>400,'html'=>$html));
        }

    }
    //收藏列表分页
    public function coll_list(){
        $url =C('api_url')['收藏列表'];
        $data['FuncName'] = 'GET_WH_FAV_LIST';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = I("request.page");
        $app_data = baseMD5($data);
        $return_arr = cUrl($url,$header=null, $app_data);
        // print_r($return_arr);die;
        if($return_arr["ReturnCode"]==0){
            $arr=$return_arr["ReturnData"]["rows"];
            $result["code"]=0;
            $result["data"]=$arr;
            $this->ajaxReturn($result);
        }else{
            $this->ajaxReturn(array('code'=>'-1','msg'=>$return_arr['ReturnText']));
        }
    }
    //删除我的收藏仓
    public function deleteCollection()
    {
        //删除仓库url
        $url =C('api_url')['删除我的仓库'];
        $id = I('post.')['id']['a'];
        if(count($id) < 1)
        {
            $this->ajaxReturn(400);
        }
        //批量删除
        foreach($id as $key =>$val)
        {
            $data['Stores'][] = array('StoreID'=>$val);
        }
         $data['FuncName'] = 'WH_FAV_DEL';
         $data['LoginID'] = $this->LoginID;
         $app_data = baseMD5($data);
            //print_r($app_data);die;
         $return = cUrl($url,$header=null, $app_data);
          if($return['ReturnCode'] == 0)
          {
              $this->ajaxReturn(200);
          }
          else
          {
              $this->ajaxReturn(401);
          }


    }
    //我的地址
    public function my_address(){
        $url =C('api_url')['我的地址'];
        $data['FuncName'] = 'GET_MY_ADDR_LIST';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = cUrl($url,$header=null, $app_data);
         //print_r($return_arr);die;
        if($return_arr["ReturnCode"]==0){
            $arr=$return_arr["ReturnData"]["rows"];
            $this->assign("arr",$arr);
            $this->display();
        }else{
            echo $return_arr['ReturnText'];
        }
    }
    //分页
    public function address_list(){
        $url =C('api_url')['我的地址'];
        $data['FuncName'] = 'GET_MY_ADDR_LIST';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = cUrl($url,$header=null, $app_data);
        //print_r($return_arr);die;
        if($return_arr["ReturnCode"]==0){
            $arr=$return_arr["ReturnData"]["rows"];
            $result["code"]=0;
            $result["data"]=$arr;
            $this->ajaxReturn($result);
        }else{
            $this->ajaxReturn(array('code'=>'-1','msg'=>$return_arr['ReturnText']));
        }
    }
    //删除地址
    public function address_del(){
        $url =C('api_url')['删除地址'];
        $data['FuncName'] = 'MY_ADDR_DEL';
        $data['LoginID'] = $this->LoginID;
        $data['AddrID'] = I("request.id");
        $app_data = baseMD5($data);
        $return_arr = cUrl($url,$header=null, $app_data);
        //print_r($return_arr);die;
       $this->redirect("my/my_address");
    }
    //编辑地址
    public function address_edit(){
        $arr=$_GET;
        $city=explode(",",$arr["city"]);
        $city_id=explode(",",$arr["city_id"]);

        $da["sheng_id"]=$city_id[0];
        $da["sheng_name"]=$city[0];
        $da["shi_id"]=$city_id[1];
        $da["shi_name"]=$city[1];
        $da["xian_id"]=$city_id[2];
        $da["xian_name"]=$city[2];
        //print_r($city);die;
        //print_r($arr);die;
        //获取省市县
        $url = C('api_url')['全国行政三级联动数据'];
        $data=array();
        $data['FuncName'] = 'GET_REGION';
        $data['LoginID'] = $this->LoginID;
        $app_data = baseMD5($data);
        //返回的参数
        $return_arr = (cUrl($url,$header=null, $app_data));
        S('city',$return_arr,86400);
        $this->assign('data',$return_arr);

        //print_r($arr);
        $this->assign("da",$da);
        $this->assign($arr);
        $this->display();
    }
    //新增地址
    public function add_address()
    {
        //获取省市县
        $url = C('api_url')['全国行政三级联动数据'];
        $data=array();
        $data['FuncName'] = 'GET_REGION';
        $data['LoginID'] = $this->LoginID;
        $app_data = baseMD5($data);
        //返回的参数
        $return_arr = (cUrl($url,$header=null, $app_data));
        S('city',$return_arr,86400);
        $this->assign('data',$return_arr);
       $this->display();
    }
/*LoginID
Contact
Mobile
Tel
ProvID
CityID
DistrictID
Addr
ZCode
Lng
Lat
Default*/
    //新增收货地址 post
    public function address_post()
    {
        $data_ajax = I('post.');
        $baiduUrl = 'http://api.map.baidu.com/geocoder/v2/?address='.$data_ajax['address'].'&output=json&ak=Nvj0t2xBjkE0GrXOQ1kjKwIAlZ6gz5jf';
        $result = json_decode(file_get_contents($baiduUrl),true);
        //print_r($result);die;
        if($result['status'] == 1)
        {
            $this->ajaxReturn(array('code'=>400,'msg'=>'无法获取经纬度'));
        }
        $url = C('api_url')['新增我的地址信息'];
        $data=array();
        $data['FuncName'] = 'MY_ADDR_ADD';
        $data['LoginID'] = $this->LoginID;
        $data['Contact'] = $data_ajax['name'];
        $data['Mobile'] = $data_ajax['phone'];
        $data['ProvID'] = $data_ajax['city1'];
        $data['CityID'] = $data_ajax['city2'];
        $data['DistrictID'] = $data_ajax['city3'];
        $data['Addr'] = $data_ajax['address'];
        $data['Lng'] = $result['result']['location']['lng'];
        $data['Lat'] = $result['result']['location']['lat'];
        if($data_ajax['defaults'] == 1)
        {
            $data['Default'] = 'true';
        }
        else
        {
            $data['Default'] = 'false';
        }

        $app_data = baseMD5($data);
        //print_r($app_data) ;die;
        //返回的参数
        $return_arr = (cUrl($url,$header=null, $app_data));
        if($return_arr['return_arr'] == 0)
        {
            $this->ajaxReturn(array('code'=>200,'msg'=>'添加成功'));
        }
        else
        {
            $this->ajaxReturn(array('code'=>400,'msg'=>$return_arr['ReturnText']));
        }
    }
    //设置默认地址
    public function defaults()
    {
        $id = I('post.id');
        $url = C('api_url')['设置默认地址'];
        $data=array();
        $data['FuncName'] = 'MY_ADDR_DEFAULT';
        $data['LoginID'] = $this->LoginID;
        $data['AddrID'] = $id;
        $data['Default'] = 'true';
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        if($return_arr['ReturnCode'] == 0)
        {
            $this->ajaxReturn(200);
        }
        else
        {
            $this->ajaxReturn(400);
        }
    }
    //修改地址
    public function exitress_post()
    {
        $data_ajax = I('post.');
        $baiduUrl = 'http://api.map.baidu.com/geocoder/v2/?address='.$data_ajax['address'].'&output=json&ak=Nvj0t2xBjkE0GrXOQ1kjKwIAlZ6gz5jf';
        $result = json_decode(file_get_contents($baiduUrl),true);
        //print_r($result);die;
        if($result['status'] == 1)
        {
            $this->ajaxReturn(array('code'=>400,'msg'=>'无法获取经纬度'));
        }
        $url = C('api_url')['修改我的地址'];
        $data=array();
        $data['AddrID'] = $data_ajax['AddrID'];
        $data['FuncName'] = 'MY_ADDR_UPDATE';
        $data['LoginID'] = $this->LoginID;
        $data['Contact'] = $data_ajax['name'];
        $data['Mobile'] = $data_ajax['phone'];
        $data['ProvID'] = $data_ajax['city1'];
        $data['CityID'] = $data_ajax['city2'];
        $data['DistrictID'] = $data_ajax['city3'];
        $data['Addr'] = $data_ajax['address'];
        $data['Lng'] = $result['result']['location']['lng'];
        $data['Lat'] = $result['result']['location']['lat'];
        if($data_ajax['defaults'] == 1)
        {
            $data['Default'] = 'true';
        }
        else
        {
            $data['Default'] = 'false';
        }

        $app_data = baseMD5($data);
        //print_r($app_data) ;die;
        //返回的参数
        $return_arr = (cUrl($url,$header=null, $app_data));
        if($return_arr['return_arr'] == 0)
        {
            $this->ajaxReturn(array('code'=>200,'msg'=>'编辑成功'));
        }
        else
        {
            $this->ajaxReturn(array('code'=>400,'msg'=>$return_arr['ReturnText']));
        }
    }
    //获取更多城市
    public function get_city()
    {
        $id = I('post.id');
        if(S('city') == '')
        {
            //获取省市县
            $url = C('api_url')['全国行政三级联动数据'];
            $data=array();
            $data['FuncName'] = 'GET_REGION';
            $data['LoginID'] = $this->LoginID;
            $app_data = baseMD5($data);
            //返回的参数
            $return_arr = (cUrl($url,$header=null, $app_data));
            S('city',$return_arr,86400);
        }
        foreach(S('city')['ReturnData'] as $key =>$val)
        {
            if($val['ProvID'] == $id)
            {
                $this->ajaxReturn($val['Citys']);
                break;
            }
        }
    }
    //获取更多城市
    public function get_city1()
    {
        //省
        $cid = I('post.cid');
        //市
        $id = I('post.id');
        if(S('city') == '')
        {
            //获取省市县
            $url = C('api_url')['全国行政三级联动数据'];
            $data=array();
            $data['FuncName'] = 'GET_REGION';
            $data['LoginID'] = $this->LoginID;
            $app_data = baseMD5($data);
            //返回的参数
            $return_arr = (cUrl($url,$header=null, $app_data));
            S('city',$return_arr,86400);
        }
        foreach(S('city')['ReturnData'] as $key =>$val)
        {
            if($val['ProvID'] == $cid)
            {
                foreach($val['Citys'] as $k =>$v)
                {
                    if($v['CityID'] == $id)
                    {
                        $this->ajaxReturn($v['Dists']);
                        break;
                    }
                }
            }
        }
    }
    //Array ( [ReturnCode] => 0 [ReturnText] => [ReturnData] => Array ( [MyPoint] => 0 [Total] => 0 [Rows] => Array ( ) ) )
    //我的积分明细
    public function myJifen()
    {
        $url = C('api_url')['获取我的积分明细'];
        $data['FuncName'] = 'GET_POINT_DETAIL';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        $this->assign('jifen',$return_arr);
        $this->display();
    }
    public function myJifenPage()
    {
        $url = C('api_url')['获取我的积分明细'];
        $data['FuncName'] = 'GET_POINT_DETAIL';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = I('post.page');
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));
        $this->ajaxReturn(array('code'=>'0','data'=>$return_arr['ReturnData']['Rows']));
    }
    //我的优惠券明细
    public function youhuuijuan()
    {
        $url = C('api_url')['获取我的优惠券'];
        $data['FuncName'] = 'GET_COUPON_DETAIL';
        $data['LoginID'] = $this->LoginID;
        $data['PageIndex'] = 1;
        $app_data = baseMD5($data);
        $return_arr = (cUrl($url,$header=null, $app_data));//dump($return_arr);die;
        $this->assign('youhuijuan',$return_arr['ReturnData']['rows']);
        $this->display();
    }
}